home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / WIN / VB_DB / PROFIT.ZIP / DELIMAIN.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-09-23  |  11.1 KB  |  424 lines

  1. VERSION 2.00
  2. Begin MDIForm DeliMain 
  3.    Caption         =   "Profit Chef"
  4.    ClientHeight    =   3450
  5.    ClientLeft      =   1305
  6.    ClientTop       =   2355
  7.    ClientWidth     =   6915
  8.    Height          =   4140
  9.    Icon            =   DELIMAIN.FRX:0000
  10.    Left            =   1245
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "DeliMain"
  13.    Top             =   1725
  14.    Width           =   7035
  15.    Begin PictureBox picToolbar 
  16.       Align           =   1  'Align Top
  17.       BackColor       =   &H00C0C0C0&
  18.       Height          =   525
  19.       Left            =   0
  20.       ScaleHeight     =   500
  21.       ScaleMode       =   0  'User
  22.       ScaleWidth      =   6885
  23.       TabIndex        =   0
  24.       Top             =   0
  25.       Width           =   6915
  26.       Begin CommonDialog CMDialog1 
  27.          Left            =   6330
  28.          Top             =   30
  29.       End
  30.       Begin SSCommand C3DLabels 
  31.          Height          =   500
  32.          Left            =   3700
  33.          Picture         =   DELIMAIN.FRX:0302
  34.          TabIndex        =   8
  35.          Top             =   0
  36.          Width           =   500
  37.       End
  38.       Begin SSCommand C3DPrice 
  39.          Height          =   500
  40.          Left            =   3200
  41.          Picture         =   DELIMAIN.FRX:0604
  42.          TabIndex        =   7
  43.          Top             =   0
  44.          Width           =   500
  45.       End
  46.       Begin SSCommand C3DOrder 
  47.          Height          =   500
  48.          Left            =   2700
  49.          Picture         =   DELIMAIN.FRX:0906
  50.          TabIndex        =   6
  51.          Top             =   0
  52.          Width           =   500
  53.       End
  54.       Begin SSCommand C3DIngred 
  55.          Height          =   500
  56.          Left            =   2200
  57.          Picture         =   DELIMAIN.FRX:0C08
  58.          TabIndex        =   5
  59.          Top             =   0
  60.          Width           =   500
  61.       End
  62.       Begin SSCommand C3DRecipe 
  63.          Height          =   500
  64.          Left            =   1600
  65.          Picture         =   DELIMAIN.FRX:0F0A
  66.          TabIndex        =   4
  67.          Top             =   0
  68.          Width           =   500
  69.       End
  70.       Begin SSCommand C3DChanges 
  71.          Height          =   500
  72.          Left            =   1100
  73.          Picture         =   DELIMAIN.FRX:120C
  74.          TabIndex        =   3
  75.          Top             =   0
  76.          Width           =   500
  77.       End
  78.       Begin SSCommand C3DBun 
  79.          Height          =   500
  80.          Left            =   600
  81.          Picture         =   DELIMAIN.FRX:150E
  82.          TabIndex        =   2
  83.          Top             =   0
  84.          Width           =   500
  85.       End
  86.       Begin SSCommand C3DReset 
  87.          Height          =   500
  88.          Left            =   0
  89.          Picture         =   DELIMAIN.FRX:1810
  90.          TabIndex        =   1
  91.          Top             =   0
  92.          Width           =   500
  93.       End
  94.    End
  95.    Begin Menu File 
  96.       Caption         =   "&File"
  97.       Begin Menu FileSupplier 
  98.          Caption         =   "&1-Supplier File"
  99.       End
  100.       Begin Menu FileRecGroup 
  101.          Caption         =   "&2-Recipe Group File"
  102.       End
  103.       Begin Menu FileIngGroup 
  104.          Caption         =   "&3-Ingredient Group File"
  105.       End
  106.       Begin Menu FileIngred 
  107.          Caption         =   "&4-Ingredient File"
  108.       End
  109.       Begin Menu FileRecipe 
  110.          Caption         =   "&5-Recipe File"
  111.       End
  112.       Begin Menu FileSalesMix 
  113.          Caption         =   "&6-Sales Mix File"
  114.       End
  115.       Begin Menu FileExit 
  116.          Caption         =   "E&xit"
  117.       End
  118.    End
  119.    Begin Menu Report 
  120.       Caption         =   "&Report"
  121.       Begin Menu ReportIngredient 
  122.          Caption         =   "&Ingredient List"
  123.       End
  124.       Begin Menu ReportOrderGuide 
  125.          Caption         =   "&Order Guide"
  126.       End
  127.       Begin Menu ReportAuto 
  128.          Caption         =   "&Suggested Retail Changes"
  129.       End
  130.       Begin Menu ReportPrice 
  131.          Caption         =   "&Price List"
  132.       End
  133.       Begin Menu ReportMix 
  134.          Caption         =   "Sales &Mix Profitability"
  135.       End
  136.       Begin Menu Sep1 
  137.          Caption         =   "-"
  138.       End
  139.       Begin Menu ReportLabel 
  140.          Caption         =   "&All Label Print"
  141.       End
  142.       Begin Menu ReportChangeLabel 
  143.          Caption         =   "&Change Label Print"
  144.       End
  145.       Begin Menu ReportIndividual 
  146.          Caption         =   "I&ndividual Label Print"
  147.       End
  148.       Begin Menu Sep2 
  149.          Caption         =   "-"
  150.       End
  151.       Begin Menu ReportRecipe 
  152.          Caption         =   "&Recipe List"
  153.       End
  154.       Begin Menu ReportSupplier 
  155.          Caption         =   "S&upplier List"
  156.       End
  157.       Begin Menu ReportIngGroup 
  158.          Caption         =   "In&gredient Group List"
  159.       End
  160.       Begin Menu ReportRecGroup 
  161.          Caption         =   "R&ecipe Group List"
  162.       End
  163.    End
  164.    Begin Menu Utilities 
  165.       Caption         =   "&Utilities"
  166.       Begin Menu UtilityReset 
  167.          Caption         =   "&Reset Recipe Update Flags"
  168.       End
  169.       Begin Menu UtilitySubstitute 
  170.          Caption         =   "&Substitute Ingredient"
  171.       End
  172.    End
  173.    Begin Menu Options 
  174.       Caption         =   "&Options"
  175.       Begin Menu OptionsPrint 
  176.          Caption         =   "&Print Options"
  177.       End
  178.       Begin Menu OptionsLabel 
  179.          Caption         =   "&Shelf Label Format"
  180.       End
  181.       Begin Menu OptionsToolbar 
  182.          Caption         =   "&ToolBar"
  183.          Checked         =   -1  'True
  184.       End
  185.    End
  186.    Begin Menu Help 
  187.       Caption         =   "&Help"
  188.       Begin Menu HelpAbout 
  189.          Caption         =   "&About"
  190.       End
  191.       Begin Menu HelpContents 
  192.          Caption         =   "&Contents"
  193.       End
  194.    End
  195. Sub C3DBun_Click ()
  196.     IngreMnt.Show 0
  197. End Sub
  198. Sub C3DChanges_Click ()
  199.      PrnAuto.Show 1
  200.      DeliMain.Show
  201. End Sub
  202. Sub C3DIngred_Click ()
  203.      PrnIngre.Show 1
  204.      DeliMain.Show
  205. End Sub
  206. Sub C3DLabels_Click ()
  207.      ReportSelection = 2
  208.      PrnLabel.Show 1
  209.      DeliMain.Show
  210. End Sub
  211. Sub C3DOrder_Click ()
  212.      PrnOrder.Show 1
  213.      DeliMain.Show
  214. End Sub
  215. Sub C3DPrice_Click ()
  216.      PrnPrice.Show 1
  217.      DeliMain.Show
  218. End Sub
  219. Sub C3DRecipe_Click ()
  220.     RecipMnt.Show 0
  221. End Sub
  222. Sub C3DReset_Click ()
  223.      UpdtRset.Show 1
  224.      DeliMain.Show
  225. End Sub
  226. Sub FileExit_Click ()
  227.     Unload DeliMain
  228. End Sub
  229. Sub FileIngGroup_Click ()
  230.     IngGrMnt.Show 0
  231. End Sub
  232. Sub FileIngred_Click ()
  233.     IngreMnt.Show 0
  234. End Sub
  235. Sub FileRecGroup_Click ()
  236.     RecGrMnt.Show 0
  237. End Sub
  238. Sub FileRecipe_Click ()
  239.     RecipMnt.Show 0
  240. End Sub
  241. Sub FileSalesMix_Click ()
  242.     SalesMix.Show 0
  243. End Sub
  244. Sub FileSupplier_Click ()
  245.     SupMnt.Show 0
  246. End Sub
  247. Sub HelpAbout_Click ()
  248.      AboutBox.Show 1
  249. End Sub
  250. Sub HelpContents_Click ()
  251.   If FileExists("deli.hlp") Then
  252.     Const HELP_KEY = &H101
  253.     CMDialog1.HelpFile = "deli.hlp"
  254.     CMDialog1.HelpCommand = HELP_KEY
  255.     CMDialog1.HelpKey = "Contents"
  256.     CMDialog1.Action = 6
  257.   Else
  258.     Msg$ = "Help file not found."
  259.     T1% = MsgBox(Msg$, 0, "Note")
  260.   End If
  261. End Sub
  262. Sub MDIForm_Load ()
  263.   '******** Initialize Btrieve ********************
  264.     init$ = "/m:38 /p:4096 /b:16 /u:2 /f:20 /l:20 /n:12 /t:c:\btrieve.trn"
  265.     St% = WBtrvInit(init$)
  266.     If St% <> 0 Then
  267.       Msg$ = "Btrieve not initialized.  Status = " + Str$(St%)
  268.       T1% = MsgBox(Msg$, 0, "Warning!")
  269.     End If
  270.     If FileExists("deli.cfg") Then
  271.       CfgFileNo% = FreeFile
  272.       Open "deli.cfg" For Random As CfgFileNo% Len = Len(CfgRec)
  273.       Get #CfgFileNo%, 1, CfgRec
  274.       Close CfgFileNo%
  275.     Else
  276.       CfgRec.PrintOptNumber = 1
  277.       CfgRec.FontName = Printer.FontName
  278.       CfgRec.FontSize = Printer.FontSize
  279.       CfgRec.TopMargin = 27
  280.       CfgRec.LeftMargin = 53
  281.       CfgRec.LabelWidth = 338
  282.       CfgRec.LabelHeight = 123
  283.       CfgRec.DescriptionX = 0
  284.       CfgRec.DescriptionY = 0
  285.       CfgRec.DescriptionFS = 12
  286.       CfgRec.RecipeNoX = 0
  287.       CfgRec.RecipeNoY = 27
  288.       CfgRec.RecipeNoFS = 10
  289.       CfgRec.PriceX = 183
  290.       CfgRec.PriceY = 83
  291.       CfgRec.PriceFS = 40
  292.       CfgRec.ShelfLifeX = 100
  293.       CfgRec.ShelfLifeY = 27
  294.       CfgRec.ShelfLifeFS = 10
  295.       CfgRec.LabelRows = 6
  296.       CfgRec.LabelColumns = 3
  297.       CfgRec.LandPortFlag = 2 'Landscape
  298.       CfgRec.ToolBar = True
  299.     End If
  300.     OpenIngGroupFile
  301.     OpenIngredientFile
  302.     OpenSupplierFile
  303.     OpenRecGroupFile
  304.     OpenRecipeFile
  305.     OpenRecipeDetFile
  306.     OpenSalesMixFile
  307.     AboutBox!Command1.Visible = True
  308.     Unload AboutBox
  309.     DeliMain.Left = 0
  310.     DeliMain.Top = 0
  311.     DeliMain.Width = 9600
  312.     DeliMain.Height = 7200
  313.     If CfgRec.ToolBar Then
  314.       OptionsToolbar.Checked = True
  315.       PicToolBar.Visible = True
  316.     Else
  317.       OptionsToolbar.Checked = False
  318.       PicToolBar.Visible = False
  319.     End If
  320.     DeliMain.Show 0
  321.     Screen.MousePointer = 0
  322. End Sub
  323. Sub MDIForm_Unload (Cancel As Integer)
  324.   CloseSupplierFile
  325.   CloseIngredientFile
  326.   CloseIngGroupFile
  327.   CloseRecGroupFile
  328.   CloseRecipeFile
  329.   CloseRecipeDetFile
  330.   CloseSalesMixFile
  331.   Unload SupMnt
  332.   Unload RecGrMnt
  333.   Unload IngGrMnt
  334.   Unload IngreMnt
  335.   Unload RecipMnt
  336.   Unload SubSingr
  337.   Unload LblFrmt
  338.   Unload PrintOpt
  339.   Unload SalesMix
  340.   '*********** Stop Btrieve *****************************
  341.   T1% = WBtrvStop()
  342.   End
  343. End Sub
  344. Sub OptionsLabel_Click ()
  345.      LblFrmt.Show 0
  346. End Sub
  347. Sub OptionsPrint_Click ()
  348.      PrintOpt.Show 0
  349. End Sub
  350. Sub OptionsToolbar_Click ()
  351.    If OptionsToolbar.Checked = True Then
  352.      OptionsToolbar.Checked = False
  353.      PicToolBar.Visible = False
  354.      CfgRec.ToolBar = False
  355.    Else
  356.      OptionsToolbar.Checked = True
  357.      PicToolBar.Visible = True
  358.      CfgRec.ToolBar = True
  359.    End If
  360.    CfgFileNo% = FreeFile
  361.    Open "deli.cfg" For Random As CfgFileNo% Len = Len(CfgRec)
  362.    Put #CfgFileNo%, 1, CfgRec
  363.    Close CfgFileNo%
  364. End Sub
  365. Sub ReportAuto_Click ()
  366.      PrnAuto.Show 1
  367.      DeliMain.Show
  368. End Sub
  369. Sub ReportChangeLabel_Click ()
  370.      ReportSelection = 2
  371.      
  372.      PrnLabel.Show 1
  373.      DeliMain.Show
  374. End Sub
  375. Sub ReportIndividual_Click ()
  376.      ReportSelection = 3
  377.      PrnLabel.Show 1
  378.      DeliMain.Show
  379. End Sub
  380. Sub ReportIngGroup_Click ()
  381.      PrnIngGr.Show 1
  382.      DeliMain.Show
  383. End Sub
  384. Sub ReportIngredient_Click ()
  385.      PrnIngre.Show 1
  386.      DeliMain.Show
  387. End Sub
  388. Sub ReportLabel_Click ()
  389.      ReportSelection = 1
  390.      PrnLabel.Show 1
  391.      DeliMain.Show
  392. End Sub
  393. Sub ReportMix_Click ()
  394.      PrnMix.Show 1
  395.      DeliMain.Show
  396. End Sub
  397. Sub ReportOrderGuide_Click ()
  398.      PrnOrder.Show 1
  399.      DeliMain.Show
  400. End Sub
  401. Sub ReportPrice_Click ()
  402.      PrnPrice.Show 1
  403.      DeliMain.Show
  404. End Sub
  405. Sub ReportRecGroup_Click ()
  406.      PrnRecGr.Show 1
  407.      DeliMain.Show
  408. End Sub
  409. Sub ReportRecipe_Click ()
  410.      PrnRecip.Show 1
  411.      DeliMain.Show
  412. End Sub
  413. Sub ReportSupplier_Click ()
  414.      PrnSuppl.Show 1
  415.      DeliMain.Show
  416. End Sub
  417. Sub UtilityReset_Click ()
  418.      UpdtRset.Show 1
  419.      DeliMain.Show
  420. End Sub
  421. Sub UtilitySubstitute_Click ()
  422.      SubSingr.Show 0
  423. End Sub
  424.